Add NSF batch record creation with 1000-record API limit#211
Open
mtyagi-ks wants to merge 3 commits into
Open
Conversation
sali-ks
approved these changes
Jul 14, 2026
adeshmukh-ks
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
create_records_batch_v3behavior (up to 1000 records pervault/records/v3/addrequest).create_nsf_records_batch()for a single API batch,create_nsf_records()for larger bulk loads with automatic chunking, andNsfRecordAddSpecfor typed batch specs.create_nsf_record()to use the shared batch add path (single-record behavior unchanged).nsf-record-add --batch-fileCLI support for JSON-driven bulk creation in scripts.Changes
SDK (
nsf_management.py)NSF_RECORD_ADD_BATCH_LIMIT = 1000NsfRecordAddSpec— dataclass for one record in a batchcreate_nsf_records_batch()— 1–1000 records in one API callcreate_nsf_records()— any count; auto-chunks into 1000-record requestscreate_nsf_record()— delegates to batch path internallyCLI (
nsf_commands.py)--batch-file FILEflag onnsf-record-addtitle,record_type,folder/folder_uid,fields,notes,record_data)created / failed / total)Tests & examples
unit_tests/test_nsf_record_add_batch.py— batch limit, chunking, failure handlingexamples/sdk_examples/nested_shared_folders/nsf_record_add.py— batch exampleTest plan
python -m unittest unit_tests.test_nsf_record_add_batch(5/5 pass)--batch-file--batch-file1002 created, 0 failed, 1002 total(2 API batches: 1000 + 2)nsf-list --records,nsf-get "NSF Batch Test Login 0001"Usage
CLI:
nsf-record-add --batch-file records.json [ { "title": "My Login", "record_type": "login", "folder": "BatchTest", "fields": { "login": "user@example.com", "password": "secret" } } ]